<?php
namespace App\Models;
use Illuminate\Support\Facades\DB;

class ShopOrderLog extends CommonModel {
	protected $table = 'shop_order_log';

    /*
    *  增加操作订单日志表
    *  @param int $type 1正常记录，2退款记录，3三方日志
    */

    public function createOrderLog($uid,$order_sn,$details,$system_name='system',$type=1){
        $order_log_info = array(
            'uid'=>$uid,
            'order_sn'=>$order_sn,
            'type'=>$type,
            'details'=>$details,
            'system_name'=>$system_name,
            'time'=>date('Y-m-d H:i:s')
        );
        return self::create($order_log_info);
    }

}